package item.inkcloud.communityservice.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;


@MapperScan(basePackages = "item.inkcloud.communityservice.mapper")
@SpringBootConfiguration
public class DruidConfig {


    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    public DruidDataSource druid(){
        DruidDataSource druidDataSource = new DruidDataSource();
        druidDataSource.setTestWhileIdle(false);
        return druidDataSource;

    }


}